<template>
  <div>
    此页面只用于测试，正式版本会删除
    我是测试页面<br />
    账号: <input type="text" name="" id="" /> <br />
    密码: <input type="text" name="" id="" />
    <el-button @click="login()">登录</el-button>
  </div>
</template>

<script>
export default {
  name: "",
  data() {
    return {};
  },
  created() {
    this.keyupSubmit();
  },
  methods: {
    keyupSubmit() {
      document.onkeydown = (e) => {
        let _key = window.event.keyCode;
        if (_key === 13 && !this.clickState) {
          this.login();
        }
      };
    },
    login() {
      // console.log(11);
      this.$router.push({
        path:'/login'
      })
      // 销毁这个返回方法
      setTimeout(function () {
         window.location.reload();
      }, 100);
    }
  },
};
</script>

<style scoped>
</style>
